"""
---------------------------------------------------------------------
- File: glass.py
- Date: 2025/11/11
- Author: yangzhide
- Email: xxzjyzd@126.com
- Description: pydantic 模型定义
---------------------------------------------------------------------
"""

from pydantic import BaseModel, Field

from app.schemas.sqlmode_base import IdTimeModel


class GlassBase(BaseModel):
    """
    班级基础模型
    """

    name: str = Field(..., description="班级名称")
    description: str | None = Field(None, description="班级描述")


class GlassCreate(GlassBase):
    """
    班级创建模型
    """

    pass


class GlassUpdate(GlassBase):
    """
    班级更新模型
    """

    name: str | None = Field(None, description="班级名称")
    description: str | None = Field(None, description="班级描述")


class GlassRead(IdTimeModel, GlassBase):
    """
    班级读取模型
    """

    id: int = Field(..., description="班级ID")
